package com.gmadmin.entity.vo.role;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.gmadmin.common.BaseEntity;
import com.gmadmin.entity.vo.api.SysApiVo;
import com.gmadmin.entity.vo.menu.SysMenuVo;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author zhangliang
 * @version 1.0
 * @date 2021/12/31 14:40
 * 角色信息输出
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class SysRoleVo extends BaseEntity {

    /**
     * ID
     */
    @ApiModelProperty(value = "角色id")
    private Long id;

    /**
     * 名称
     */
    @ApiModelProperty(value = "角色名称")
    private String name;

    /**
     * 角色级别
     */
    @ApiModelProperty(value = "角色级别")
    private Integer level;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String description;

    /**
     * 数据权限
     */
    @ApiModelProperty(value = "角色范围")
    private String dataScope;

    @ApiModelProperty(value = "是否启用,1启用，0禁用")
    private Boolean enabled;


    @ApiModelProperty(value = "关联菜单")
    private List<SysMenuVo> menus;

    @ApiModelProperty(value = "关联菜单ids")
    private List<Long> menuIds;


    @ApiModelProperty(value = "关联api")
    private List<SysApiVo> apis;

    @ApiModelProperty(value = "关联api的ids")
    private List<Long> apiIds;
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDataScope() {
        return dataScope;
    }

    public void setDataScope(String dataScope) {
        this.dataScope = dataScope;
    }


    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public Boolean getEnabled() {
        return enabled;
    }


    @ApiModelProperty(value = "是否禁用")
    public Boolean getState() {
        return Boolean.TRUE.equals(enabled);
    }


    @ApiModelProperty(value = "下拉选项显示名称")
    public String getLabel() {
        return name;
    }

    @ApiModelProperty(value = "返回值")
    public Long getValue() {
        return id;
    }

    @ApiModelProperty(value = "是否禁用，true禁用")
    public Boolean getDisabled() {
        return Boolean.FALSE.equals(enabled);
    }

    public List<SysMenuVo> getMenus() {
        return menus;
    }

    public void setMenus(List<SysMenuVo> menus) {
        this.menus = menus;
    }

    public List<Long> getMenuIds() {
        return menuIds;
    }

    public void setMenuIds(List<Long> menuIds) {
        this.menuIds = menuIds;
    }

    public List<SysApiVo> getApis() {
        return apis;
    }

    public void setApis(List<SysApiVo> apis) {
        this.apis = apis;
    }

    public List<Long> getApiIds() {
        return apiIds;
    }

    public void setApiIds(List<Long> apiIds) {
        this.apiIds = apiIds;
    }
}
